package org.liuqm.factory.simplefactory;

public class SimpleFactory {

    /**
     * 生成打印机
     * @param printType
     * @return
     */
    public static Print createPrint(String printType){
        Print print=null;
        switch (printType){
            case "blackwhite":
                //读取数据库配置文件
                print=new BlackWhitePrint();
                break;
            case "color":
                //
                print=new ColorPrint();
                break;
            case "aps":
                //
                print=new APSPrint();
                break;
            default:
                print=new BlackWhitePrint();
                break;
        }

        return print;
    }
}
